Component({
  data: {
    navList: [
      {
        title: '租币商城',
        description: '租币当钱花',
        icon: '../../../../assets/image/1.png',
        cb: () => {
          my.navigateTo({ url: '../../pages/shop/shop' })
        }
      },
      {
        title: '租币任务',
        description: '租币赚不停',
        icon: '../../../../assets/image/2.png',
        cb: () => { }
      },
      {
        title: '租币赢现金',
        description: '每天分万元奖金',
        icon: '../../../../assets/image/3.png',
        cb: () => { }
      },
      {
        title: '租币抽奖',
        description: '天天免租金',
        icon: '../../../../assets/image/1.png',
        cb: () => { }
      },
      {
        title: '租币商城',
        description: '租币当钱花',
        icon: '../../../../assets/image/1.png',
        cb: () => {
          my.navigateTo({ url: '../../pages/shop/shop' })
        }
      },
      {
        title: '租币任务',
        description: '租币赚不停',
        icon: '../../../../assets/image/2.png',
        cb: () => { }
      },
      {
        title: '租币赢现金',
        description: '每天分万元奖金',
        icon: '../../../../assets/image/3.png',
        cb: () => { }
      },
      {
        title: '租币抽奖',
        description: '天天免租金',
        icon: '../../../../assets/image/1.png',
        cb: () => { }
      }
    ]
  },
  methods: {
    navClick(e) {
      const { title } = e.target.dataset
      for (const item of this.data.navList) {
        if (item.title === title) {
          item.cb()
          return
        }
      }
    },
  },
});
